


********************************************************************************
********************************************************************************
* Figure 1: Number of Banks with Active Coal Exit Policies
********************************************************************************
********************************************************************************
use "../Intermediate/Figure_1_Data", clear

graph twoway line cumulative qdate, connect(step) xline(223) xaxis(1 2) xlabel(210(4)244, axis(1)) ///
xlabel(223 "Paris Accords adopted", axis(2)) ///
lcolor(navy) ///
ytitle("Number of Banks") ///
xtitle("Year") xtitle("", axis(2))

graph export "../Results/Graphs/Figure_1.pdf", replace

********************************************************************************
********************************************************************************
* Figure 3: Bank Exit Policies By Activity Type
********************************************************************************
********************************************************************************
use "../Intermediate/Figure_3", clear

local power lcolor(dkorange) 
local corpn lp(dash) 
local projn lp(solid)
local proje lp(dash_dot)
local mining lcolor( maroon ) 

local common scheme(white_tableau) legend( ///
       order(- "Power" - "Mining" 1 "Project Finance; New" 2 "Project Finance; New" 3 "Project Finance; Expansion" ///
       4 "Project Finance; Expansion" 5 "Corporate Finance" 6 "Corporate Finance") symxsize(8) size(small) ///
       colgap(small) keygap(small) cols(2) pos(6)) ///
       ytitle("Percent of Banks Banning (%)") xtitle("Year") 
       

graph twoway line pct_ban year if scenario == 101, `power' `projn'  || ///
             line pct_ban year if scenario == 104, `mining' `projn' || ///
             line pct_ban year if scenario == 102, `power' `proje'|| ///
             line pct_ban year if scenario == 105, `mining' `proje' || ///       
             line pct_ban year if scenario == 103, `power' `corpn'|| ///
             line pct_ban year if scenario == 106, `mining'`corpn' `common'

graph export "../Results/Graphs/Figure_3.pdf", replace


********************************************************************************
********************************************************************************
* Figure 4: Heterogeneity in Exit Policy Strength
********************************************************************************
********************************************************************************
use ../Intermediate/bank_lending_panel, clear		

twoway histogram ban_intensity_new1_max  if year==2020 &  ban_intensity_new1_max>0 , fraction bin(12) graphregion(color(white)) bgcolor(white) legend(off)  scheme(white_tableau) aspectratio(0.65) xtitle("Max Strength") ytitle("Fraction of Banks")         
graph export "../Results/Graphs/Figure_4.pdf", replace

********************************************************************************
********************************************************************************
* Figure 5: Aggregate Loan Issuance by Bank Exit Policy Strength
********************************************************************************
********************************************************************************
use "../Intermediate/Figure_5", clear
twoway  (line loan_ma_sc year if grp == 0) ///
        (line loan_ma_sc year if grp == 1)  if year >= 2010, legend(lab(1 "No or Weak Policy") lab(2 "Strong Policy"))  ///
        xtitle("") scheme(white_tableau) name(loan_ma_str, replace) scale(1.3) xsize(9) 
		
graph export "../Results/Graphs/Figure_5.pdf", replace

 
 
********************************************************************************
********************************************************************************
* Figure 6: Aggregate Loan Issuance by Borrower Treatment
********************************************************************************
********************************************************************************
use "../Intermediate/Figure_6", clear
 
 twoway  (line borr_loan_ma_s10 year if high_total_treat == 0) ///
        (line borr_loan_ma_s10 year if high_total_treat== 1)  if year >= 2010, legend(lab(1 "Non Treated or Low Treated") lab(2 "High Treated"))  ///
        xtitle("") scheme(white_tableau) name(Borrowing_Ma, replace) scale(1.3) xsize(9) 
		
graph export "../Results/Graphs/Figure_6.pdf", replace


********************************************************************************
********************************************************************************
* Figure 7: Cumulative Effects on Firm Debt Issuance
********************************************************************************
********************************************************************************
use "../Intermediate/Figure_7", clear

reghdfe log_cum_debt i.year##i.high_total_treat if aggborr_pre_debt > 0 & Country ~= "xChina" & year>2009, absorb(borrower_id year) cl(borrower_id)
coefplot, vertical  drop(_cons) xlabel(1 "2011" 2 "2012" 3 "2013" 4 "2014" 5 "2015" 6 "2016" 7 "2017" 8 "2018" 9 "2019" 10 "2020" 11 "2021" ) levels(90) graphregion(color(white)) scheme(white_tableau)
graph export "../Results/Graphs/Figure_7.pdf", replace	

********************************************************************************
********************************************************************************
* Figure 8: Cumulative Effects on Firm Debt Issuance
********************************************************************************
********************************************************************************
use "../Intermediate/Figure_8", clear

sum baseline_co2eGT if year == 2010
local base2010 = `r(mean)'
sum below2c_coal_co2eGT if year == 2010
local 2c2010 = `r(mean)'

local maxyear 2100

twoway (rarea baseline_co2eGT nopolicy_co2eGT year if year>=2010 & year <= `maxyear', fcolor(brown%50) lwidth(0)) ///
       (rarea zero baseline_co2eGT year if year>=2010 & year <= `maxyear', lwidth(0) fcolor(gs10%25)) ///
       (line nopolicy_co2eGT year if year <= `maxyear', lcolor(brown) lpattern(shortdash)) ///
       (line bigpolicy_co2eGT year  if year <= `maxyear', lcolor(green) lpattern(shortdash)) ///
       (line baseline_co2eGT year  if year <= `maxyear', lcolor(black)) /// 
       (line below2c_coal_co2eGT year if year >= 2020 & year <= `maxyear'), /// 
       scheme(white_tableau) legend(order(3 5 4 6) cols(4) pos(6)) ytitle("Coal Powerplant Emissions (GT CO2e)") xtitle("") ///
       xticks(2010(10)`maxyear') xlabel(2010(10)`maxyear') name(with_future, replace)
graph export "../Results/Graphs/counterfactual_co2.pdf", replace



